function [ blip, tout ] = get_blip_math_direct(amiga_model, ...
    audio_filter_mode, filter_method, length)

filter_short_len = get_filter_short_len();
fs = get_sampling_fq();

if ~strcmpi(amiga_model, '')
    [C1, R1, C2, R2, C3 ,R3] = get_amiga_filter_params(amiga_model);
end

if strcmpi(length, 'full') || strcmpi(filter_method, 'fq')
    tout = linspace(0, (fs-2)/fs, fs-1);
elseif strcmpi(length, 'short')
    tout = linspace(0, (filter_short_len-1) / fs, filter_short_len);
end

if strcmpi(audio_filter_mode, 'led filter off')
    
    tau = R1 * C1;
    blip = (1/tau)*exp(-1/tau*tout);
    
elseif strcmpi(audio_filter_mode, 'led filter on')
    
    a = R2*R3*C2*C3;
    b = C3*(R2+R3);
    delta = b^2 - 4*a;
    a1 = -(-b + sqrt(delta)) / (2 * a);
    b1 = -(-b - sqrt(delta)) / (2 * a);
    c = 1 / ((b1-a1)*a);
    c1 = 1 / R1 / C1;
    c2 = c1*c/(c1-a1)/(c1-b1);
    blip = c2*(c1-b1)*exp(-a1*tout) - ...
        c2*(c1-a1)*exp(-b1*tout) - ...
        c2*(a1-b1)*exp(-c1*tout);
    
    blip = real(blip);
    
elseif strcmpi(audio_filter_mode, 'led filter only')
    
    a = R2*R3*C2*C3;
    b = C3*(R2+R3);
    delta = b^2 - 4*a;
    a1 = -(-b + sqrt(delta)) / (2 * a);
    b1 = -(-b - sqrt(delta)) / (2 * a);
    c = 1 / ((b1-a1)*a);
    c1 = 1 / R1 / C1;
    c2 = c1*c/(c1-a1)/(c1-b1);
    blip = c2*(c1-b1)*exp(-a1*tout) - ...
        c2*(c1-a1)*exp(-b1*tout) - ...
        c2*(a1-b1)*exp(-c1*tout);
    
    blip = real(blip);
    
elseif strcmpi(audio_filter_mode, 'unfiltered')
    
    blip = 0*tout;
    blip(1) = 1;
    
end

blip = fir_min_phase(blip);
blip = filter_impulse(amiga_model, blip, filter_method);

if strcmpi(length, 'short') && strcmpi(filter_method, 'fq')
    tout = tout(1:1:filter_short_len);
    blip = blip(1:1:filter_short_len);
end

blip = blip / trapz(blip);

end